home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / human interface toolbox / ictbsample / ictbsample.r < prev    next >
Encoding:
Text File  |  2000-06-23  |  3.6 KB  |  86 lines

  1. /*
  2.     File:        ictbSample.r
  3.  
  4.     Contains:    This snippet shows the an example of ictb resource this is discussed in 
  5.                 Inside Macintosh:Macintosh Toolbox Essentials, page 6-158 t0 6-164.
  6.                 It is based on the Dialog Manager Q&A technote.  You can find the technote
  7.                 in the Dev.CD Jun 96 RL
  8.                       Technical Documentation
  9.                             Macintosh Technical Notes
  10.                               Archive
  11.                                 Toolbox
  12.                                       tb_525.html.
  13.              
  14.                 There is no Rez template for it, and no ResEdit template or editor.  
  15.                 This sample ictbSample.r shows how you can do one by hand.
  16.  
  17.                 The best solution is to get Resorcerer which provides an excellent ictb editor. 
  18.                 With Resorcerer, it is really simple to use ictb in your dialog boxes.
  19.  
  20.     Written by: Albert Hui    
  21.  
  22.     Copyright:    Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
  23.  
  24.                 You may incorporate this Apple sample source code into your program(s) without
  25.                 restriction. This Apple sample source code has been provided "AS IS" and the
  26.                 responsibility for its operation is yours. You are not permitted to redistribute
  27.                 this Apple sample source code as "Apple sample source code" after having made
  28.                 changes. If you're going to re-distribute the source, we require that you make
  29.                 it clear in the source that the code was descended from Apple sample source
  30.                 code, but that you've made changes.
  31.  
  32.     Change History (most recent first):
  33.                 8/6/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  34.                 
  35.  
  36. */
  37.  
  38.  
  39. #include "Types.r"
  40.  
  41. data 'ictb' (128) {
  42.     $"0020 0020"           /*$00 the button */
  43.     $"0000 0000"           /*$04 Check box 1 */
  44.     $"0000 0000"           /*$08 Check box 2  */
  45.     $"0000 0000"           /*$0C Check box 3  */
  46.     $"0000 0000"           /*$10 Edit Text 1  */
  47.     $"000D 0040"           /*$14 Edit Text 2 just change the family, */
  48.                            /*                   size, and text color */
  49.     $"8005 0054"           /*$18 Edit Text 3 change family and size, */
  50.                            /*                        using font name */
  51.     $"8005 0068"           /*$1C Stat Text 1 */
  52. /* Start of the ictb items here */
  53.     /* Color table for the done button */
  54.     $"0000 0000"           /*$20 ccSeed */
  55.     $"0000 0002"           /* Reserved / size of color table */
  56.     $"0000 0000 0000 FFFF" /* cFrameColor, 65535,65535,52428 */
  57.     $"0001 FFFF FFFF CCCC" /* cBodyColor, 0, 0, 0 */
  58.     $"0002 0000 0000 FFFF" /* cTextColor, 0, 0, 65535 */
  59.     /* Edit Text item 5 text/color info... */
  60.     $"0001"                /*$40 diFont application font */
  61.     $"0000"                /*$42 diStyle plain */
  62.     $"000A"                /*$44 diSize whatever... */
  63.     $"FFFF 8000 0000"      /*$46 forecolor */
  64.     $"FFFF FFFF CCCC"      /*$4C backColor */
  65.     $"0000"                /*$52 diMode */
  66.       /* Edit Text item 6 text/color info... */
  67.     $"008C"                /*$54 diFont application font */
  68.     $"0000"                /*$56 diStyle outline  */
  69.     $"000C"                /*$58 diSize whatever... */
  70.     $"0000 0000 0000"      /*$5A forecolor */
  71.     $"FFFF FFFF CCCC"      /*$60 backColor */
  72.     $"0000"                /*$66 diMode */
  73.     /* Edit static text item 8 /color info... */
  74.     $"007C"                /*$68 diFont application font */
  75.     $"0000"                /*$6A diStyle plain */
  76.     $"000C"                /*$6C diSize whatever... */
  77.     $"0000 0000 0000"      /*$6E forecolor */
  78.     $"FFFF FFFF CCCC"      /*$74 backColor */
  79.     $"0000"                /*$7A diMode */
  80. /* Start of the font name table here */
  81.     $"0743 6F75 7269 6572" /*$7C font name Courier */
  82.     $"0647 656E 6576 6100" /*$84 font name Geneva */
  83.     $"0850 616C 6174 696E" /*$8C font name Palatino */
  84.     $"6F00" 
  85. };
  86.